<?php
return [
    'params' => require_once __DIR__ . '/params.php',
    'aliases' => [
        '@bower' => '@vendor/bower-asset',
        '@npm'   => '@vendor/npm-asset',
    ],
    'language'=>'zh-CN',
    'sourceLanguage'=>'en-US',
    'timeZone'=>'Asia/Shanghai',
    'vendorPath' => __DIR__ . '/../../../../pear/common/vendor',
    'components' => [
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=127.0.0.1;dbname=ico',
            'username' => 'root',
            'password' => '123456',
            'charset' => 'utf8',
        ],
        'cache' => [
            'class' => 'yii\caching\MemCache',
            'servers' => [
                'a' => [
                    'host' => '127.0.0.1',
                    'port' => 11211,
                ],
            ],
            'useMemcached' => true,
            'serializer' => false,
            'keyPrefix' => 'ico:',
            'persistentId' => 'ico',
        ],
        'yacCache' => [
            'class' => 'yii\caching\YacCache'
        ],
        'uploader' => [
            'class' => 'yii\thirduploader\Uploader',
            'clients' => [
                'qiniu' => [
                    'class' => 'yii\thirduploader\clients\Qiniu',
                    'params' => [
                        'bucket' => 'aaa-info',
                    ],
                    'accessKey' => '6i_arCld62BX-9ZTxiM8oC1JFu5J2woqumdFdBbD',
                    'secretKey' => 'BKsf6JPnXhOnPodwixsEupIFzJtherGIvokM5cQs'
                ]
            ]
        ],
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning'],
                    'maxFileSize' => 512000, // 500M
                    'maxLogFiles' => 10,
                ],
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning', 'info'],
                    'maxFileSize' => 512000,
                    'maxLogFiles' => 10,
                    'categories' => [
                        'project',
                    ],
                    'logFile' => '@runtime/logs/project.log',
                ],
            ],
        ],
    ],
    'modules' => [
        'workflow' => [
            'class' => 'common\modules\workflow\Module',
        ],
    ]
];
